package io.github.talelin.latticy.service.feign;

import io.github.talelin.latticy.dto.order.PageListDTO;
import io.github.talelin.latticy.dto.order.TakeDownPageListDTO;
import io.github.talelin.latticy.dto.product.ProductPage;
import io.github.talelin.latticy.model.ProductDO;
import io.github.talelin.latticy.vo.FindResultVO;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

import javax.validation.constraints.Positive;
import java.util.List;

/**
 * @ClassName：OrderFeignService
 * @Author: ljj
 * @Date: 2022/8/10 10:05
 */
@FeignClient(value = "oms-server")
public interface ProductFeignService {

    @GetMapping("/v1/product/pageList")
    FindResultVO pageList(@RequestBody ProductPage productPage);

    @GetMapping("/v1/product/findAllByAudit")
    FindResultVO findAllByAudit();

    @PostMapping("/v1/product/getListBySkus")
    List<ProductDO> getListBySkus(@RequestBody List<String> skus);

    @GetMapping("/v1/product/findById/{id}")
    FindResultVO findById(@PathVariable @Positive(message = "{id.positive}") Long id);
}
